import request from '@/utils/request'

// 查询用户收藏车辆列表
export function listCollectVehicle(query) {
  return request({
    url: '/safety/collectVehicle/list',
    method: 'get',
    params: query
  })
}

// 查询用户收藏车辆详细
export function getCollectVehicle(userId) {
  return request({
    url: '/safety/collectVehicle/' + userId,
    method: 'get'
  })
}

// 新增用户收藏车辆
export function addCollectVehicle(data) {
  return request({
    url: '/safety/collectVehicle',
    method: 'post',
    data: data
  })
}

// 修改用户收藏车辆
export function updateCollectVehicle(data) {
  return request({
    url: '/safety/collectVehicle',
    method: 'put',
    data: data
  })
}

// 删除用户收藏车辆
export function delCollectVehicle(userId) {
  return request({
    url: '/safety/collectVehicle/' + userId,
    method: 'delete'
  })
}
